package com.eascs.web.o2o.quartz.dao;

import com.eascs.app.dao.JdbcSession;
import com.eascs.app.dao.PageResult;
import com.eascs.app.dao.SqlPageQuery;
import com.eascs.app.runtime.RuntimeSetting;
import com.eascs.web.o2o.report.constants.FefundConstants;

import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import javax.inject.Inject;
import java.util.List;

@Repository
public class BaseJobDao {
	@Inject
	JdbcSession jdbcSession;
	
	
	@Transactional(transactionManager = "transactionManager")
	public boolean updateEntity(Object entity) {
		return jdbcSession.updateById(entity)>0;
	}

    public <T> Object findEntity(String sql, Class<T> requiredType, Object... params){
    	return jdbcSession.findEntity(sql, requiredType, params);
    }
    
    public<T> List<T>  findEntitys(String sql, Class<T> requiredType, Object... params){
    	return jdbcSession.findEntitys(sql, requiredType, params);
    }
    

}
